﻿using MediatR;
using Traceability.Commont.Domains.ScratchTheFat;
using Traceability.Commont.DTOs.CommontFiles;
using Traceability.Commont.Infrastructures.Interfaces;

namespace U.Enterprise.Api.Applications.LoginNEwSheet
{
    public class LoginHtmlHandler : IRequestHandler<LoginHtmlCommond, Resqults>
    {
        private readonly IBateRepository<NewLogions> _NewLogions;

        public LoginHtmlHandler(IBateRepository<NewLogions> newLogions)
        {
            _NewLogions = newLogions;
        }

        public async Task<Resqults> Handle(LoginHtmlCommond request, CancellationToken cancellationToken)
        {
            try
            {
                var list = new Resqults() { Code = 0 };



                list.Date = _NewLogions.GetAll().ToList();


                return list;

            }
            catch (Exception)
            {

                throw;
            }
            

        }
    }
}
